$(document).ready(function () {
	$("table tr:even").addClass("even");
	$("table tr:odd").addClass("odd");
	$("table tr:first").removeClass().addClass("header");
	
	//select right menu
	var action = $("input#action").val();
	$("#left-panel").find("#"+action).addClass("selected");
	
	$("#header .title").click(function (){
		window.location.href = "../";
	});
	
	$("#m"+$("input#menu").val()).addClass("selected");
	
	// add highlight for expired doc
	$("td.remainingTime").each(function () {
		var self = $(this);
		parseInt(self.html()) < 0 && self.addClass("expired");
	});
});

function submit(ac,form) {
	form.attr('action', "../"+ac);
	form.submit();
};
